import { Inject } from '@midwayjs/core';
import { CoolController, BaseController } from '@cool-midway/core';
import { MemberGradeEntity } from '../../entity/grade';
import { MemberGradeService } from '../../service/grade';

/**
 * 会员等级
 */
@CoolController({
  api: ['add', 'delete', 'update', 'info', 'list', 'page'],
  entity: MemberGradeEntity,
  service: MemberGradeService,
  pageQueryOp: {
    keyWordLikeFields: ['a.gradeName'],
    fieldEq: ['a.status'],
    addOrderBy: {
      requiredScore: 'asc',
    },
  },
})
export class AdminMemberGradeController extends BaseController {
  @Inject()
  memberGradeService: MemberGradeService;
}
